/**   
 * api接口统一管理
 */
import {
  get,
  post
} from './http.js'
// 获取轮播图数据
export function getBanner(P) {
  return post('v2/banner/get', P);
}
// 获取推荐歌单
export const getRecommend = p => post('personalized/playlist', p)
// 获取最新歌曲
export const getNewsong = p => post('personalized/newsong', p)
// 获取推荐MV
export const getPersonalizedMv = () => post('personalized/mv')
// 获取精品歌单
export const getTopPlaylist = p => post('playlist/highquality/list', p)
// 获取歌单列表
export const getPlaylist = p => post('playlist/list', p)
// 获取最新音乐
export const getNewSongs = p => post('v1/discovery/new/songs', p)
// 获取Mv列表
export const getMvs = p => post('mv/all', p)
// 查询
export const search = p => post('search/get', p)
// 获取歌单详情
export const getPlaylistDetail = p => post('v3/playlist/detail', p)
// 获取歌单评论
export const getPlaylistComments = (id, p) => post(`v1/resource/comments/A_PL_0_${id}`, p)
// 获取MV详情
export const getMvDetail = p => post(`mv/detail`, p)
// 获取歌手头像
export const getArtistIcon = (id, p) => post(`v1/artist/${id}`, p)
// 获取MV评论
export const getMvComment = (id, p) => post(`v1/resource/comments/R_MV_5_${id}`, p)
// 获取相关MV
export const getSimiMvUrl = p => post('discovery/simiMV', p)
// 获取MV播放地址
export const getMvUrl = p => post(`song/enhance/play/mv/url`, p)
// 获取歌曲播放地址
export const getMusicUrl = id => post(`song/enhance/player/url?ids=[${id}]&br=999000`)
// 获取歌词
export const getMusicLyc = id => get(`song/lyric?id=${id}&lv=1&kv=1&tv=-1`)
